module.exports = function ($scope, $state, $stateParams,$resource,$modal,$http,$q, toaster) {
    /* 分页
			* ========================================= */
			$scope.maxSize = 5;             //最多显示多少个按钮
			$scope.bigCurrentPage = 1;      //当前页码
			$scope.itemsPerPage = 10         //每页显示几条
			
			$scope.getlist = function () {
				var para = {
					pageNo:$scope.bigCurrentPage, 
					pageSize:$scope.itemsPerPage
				};
				// para = angular.extend($scope.parameters, para);
				$resource('/api/ac/ggc/reviewExpertService/findStorageList', {}, {}).
				save(para,function(res) {
					console.log(para);
					if (res.errcode !== 0) {
						toaster.error({title:"",body:res.errmsg});
						return;
					}
					console.log(res);
					$scope.objs = res.data.results;
					$scope.bigTotalItems = res.data.totalRecord;

					
				})
			};
			
			$scope.getlist(); 
    // 抽取专家
		$scope.search = function () {
        console.log('抽取专家');
        $resource('/api/ac/ggc/reviewExpertService/setRandExpertList', {}, {}).
        save({},function(res) {
            if (res.errcode == 0) {
                alert('专家抽取成功');
                $state.go('app.expertExtractionList')
            } else {
                toaster.error({title:"",body:res.errmsg});
            }
            
        })
    };

};
